def fibonacci(n):
    """返回第n个斐波那契数"""
    if n <= 0:
        return 0
    elif n == 1:
        return 1
    else:
        a, b = 0, 1
        for _ in range(2, n + 1):
            a, b = b, a + b
        return b

def print_fibonacci_sequence(length):
    """打印指定长度的斐波那契数列"""
    print(f"前{length}个斐波那契数:")
    for i in range(1, length + 1):
        print(fibonacci(i), end=" ")
    print()  # 换行

def fibonacci_product(n):
    """计算前n个斐波那契数的乘积"""
    if n <= 0:
        return 0
    product = 1
    for i in range(1, n + 1):
        product *= fibonacci(i)
    return product

# 主程序
if __name__ == "__main__":
    sequence_length = 10
    print_fibonacci_sequence(sequence_length)
    print(f"前{sequence_length}个斐波那契数的乘积: {fibonacci_product(sequence_length)}")